package com.ytjj.qmyx.mall.controller.app;

import com.ytjj.common.api.CommonResult;
import com.ytjj.qmyx.mall.model.response.PayAfterUseResponse;
import com.ytjj.qmyx.mall.service.ActivityService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 先付后用控制器
 *
 * 
 *  *
 **/
@RestController
@RequestMapping("/payafteruse")
public class AppPayAfterUseController {

    @Resource
    private ActivityService activityService;

    @GetMapping("/list")
    public CommonResult list(@RequestParam Integer pageNum,
                             @RequestParam Integer pageSize) {
        List<PayAfterUseResponse> list = activityService.getPayAfterUseList(pageNum,pageSize);
        return CommonResult.page(list);
    }
}
